<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Index Page</title>
    <script src="/static/js/jquery-1.8.3.min.js"></script>
</head>
<body>
    <p>admin index page,</p>
    <a href="<{:Url('/admin/Login/logout')}>">退出登录</a>
    <br>

    <div>
        <button id="getData">获取数据</button>
        <div id="dataBox"></div>
    </div>
    <script type="text/javascript">
        $(document).ready(function(){
            console.log('hello');
            $('#getData').click(function(){
                $.get("<{:Url('/admin/Index/getData')}>", function(data, status) {
                    $('#dataBox').text('name:' + data.name + ', age:' + data.age);
                });
            });
        });
    </script>
</body>
</html>